home *** CD-ROM | disk | FTP | other *** search
- /* NBCHECK.C - program checks to see if NetBIOS is available and how */
- /* many network names, commands & sessions are present. Uses NetBIOS */
- /* interrupt (INT 2Ah). Programmer: Paul McGinnis, AST Research Data */
- /* Comm Support (Dept. 430). 714-863-9991. */
- /* */
- /* Compiled using Borland's Turbo C v1.5 and tiny memory model */
-
- #include <stdio.h>
- #include <dos.h>
-
- main()
- {
- typedef unsigned char byte;
- typedef unsigned int word;
- byte iflag;
- word names, commands, sessions;
- char *PRGMR = "Programmer: Paul McGinnis - v1.00";
- puts("NetBIOS test program. Version 1.00");
- _AH = 0;
- geninterrupt(0x2a);
- iflag = _AH;
- if (!iflag)
- {
- puts(" *** ERROR - NetBIOS not installed. ***");
- return;
- }
- _AX = 0x500;
- geninterrupt(0x2a);
- names = _BX;
- commands = _CX;
- sessions = _DX;
- printf("# of network names available: %u\n", names);
- printf("# of network commands available: %u\n", commands);
- printf("# of network sessions available: %u\n", sessions);
- }